import request from '@/config/axios'

// 获得地区树
export const getAreaTree = async () => {
  return await request.get({
    url: import.meta.env.VITE_BASE_ROLE + '/userCenter/area/area/tree.json'
  })
}

// 获得 IP 对应的地区名
export const getAreaByIp = async (ip: string) => {
  return await request.get({
    url: import.meta.env.VITE_BASE_ROLE + '/userCenter/area/area/get-by-ip?ip=' + ip
  })
}
